<!DOCTYPE html>
<!--suppress ALL -->
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
<!--    组件：传递给组件中的值：需要先绑定然后用props接收参数-->
       <mf v-for="item in items" v-bind:item="item"></mf>
</div>
<script>
    //定义一个Vue组件component
    Vue.component("mf",{
        props: ['item'],
        template:'<li>{{item}}</li>'
    });
    let vm=new Vue({
        el: "#app",
        data: {
            items: ["java","linux","c++"]
        }
    });
</script>
</body>
</html>